#ifndef NL_SOCKET_H_
#define NL_SOCKET_H_

#include "include/socket.h"

#include <asm/types.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>

namespace unet {
class NlSocket : public Socket {
 public:
  NlSocket(uint32 pid, uint32 groups)
      : pid_(pid),
        groups_(groups) {
  }
  ~NlSocket();

  bool Listen();

  int32 Send(const char* buf, uint32 len);
  int32 Recv(char* buf, uint32 len);

 private:
  uint32 pid_;
  uint32 groups_;

  DISALLOW_COPY_AND_ASSIGN(NlSocket);
};

}

#endif
